package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.PageBean;
import com.zzyl.nursing.dto.OrdersProjectDto;
import com.zzyl.nursing.service.OrdersProjectService;
import com.zzyl.serve.domain.NursingProject;
import com.zzyl.serve.service.INursingLevelService;
import com.zzyl.serve.service.INursingProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/member/orders/project")
public class OrdersProjectController {
    @Autowired
    private OrdersProjectService ordersProjectService;
    @GetMapping("/page")
    public PageBean<NursingProject> page(OrdersProjectDto ordersProjectDto){
        PageBean<NursingProject> page = ordersProjectService.page(ordersProjectDto);
        return page;
    }
    @GetMapping("/{id}")
    public AjaxResult getById(@PathVariable Long id){
        NursingProject nursingProject = ordersProjectService.getById(id);
        return AjaxResult.success(nursingProject);
    }
}
